<template>
  <div style="height:100%;overflow-y:auto">
  <Card>

    <Row>
      <h3>征信摘要：</h3>
    </Row>
    <br>
    <Collapse v-model="value1">
      <Panel name="1">
        个人股权投资信息
        <div slot="content">
          <Table :columns="intPyPersonShareholderreporttwo" :data="intPyPersonShareholderreport"></Table>
        </div>
      </Panel>
      <Panel name="2">
        个人担任法定代表人信息
        <div slot="content">
          <Table :columns="intPyPersonArtificialnationalInfotwo" :data="intPyPersonArtificialnationalInfo"></Table>
        </div>
      </Panel>
      <Panel name="3">
        个人担任高管信息
        <div slot="content">
          <Table :columns="intPyPersonTopmanagerinfotwo" :data="intPyPersonTopmanagerinfo"></Table>
        </div>
      </Panel>
    </Collapse>
  </Card>
  </div>
</template>

<script>
export default {
  name: 'loan-credit-reporting',
  data () {
    return {
      item: null,
      datas: [],
      value1: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
      baseUrl: this.$appContext.marvels_core_approve,
      intPyPersonShareholderreport: [],
      intPyPersonShareholderreporttwo: [
        {
          title: '投资人姓名',
          key: 'name'
        },
        {
          title: '被投资机构名称',
          key: 'corpName'
        },
        {
          title: '工商注册号',
          key: 'registerNo'
        },
        {
          title: '工商注册号',
          key: 'corpTypeCaption'
        },
        {
          title: '注册资金',
          key: 'registFund'
        },
        {
          title: '机构状态名称',
          key: 'statusCaption'
        },
        {
          title: '认缴出资额（万元)',
          key: 'contributiveFund'
        },
        {
          title: '出资比例(%)',
          key: 'contributivePercent'
        }
      ],
      intPyPersonArtificialnationalInfo: [],
      intPyPersonArtificialnationalInfotwo: [
        {
          title: '法人姓名',
          key: 'artificialName'
        },
        {
          title: '企业名称',
          key: 'corpName'
        },
        {
          title: '工商注册号',
          key: 'registerNo'
        },
        {
          title: '组织机构代码',
          key: 'orgCode'
        },
        {
          title: '企业类型名称',
          key: 'corpTypeCaption'
        },
        {
          title: '注册资金',
          key: 'registFund'
        },
        {
          title: '机构状态名称',
          key: 'statusCaption'
        }
      ],
      intPyPersonTopmanagerinfo: [],
      intPyPersonTopmanagerinfotwo: [
        {
          title: '任职人姓名',
          key: 'name'
        },
        {
          title: '机构名称',
          key: 'corpName'
        },
        {
          title: '工商注册号',
          key: 'registerNo'
        },
        {
          title: '企业类型名称',
          key: 'corpTypeCaption'
        },
        {
          title: '注册资金',
          key: 'registFund'
        },
        {
          title: '组织机构代码',
          key: 'statusCaption'
        },
        {
          title: '职务名称',
          key: 'positionCaption'
        }
      ]
    }
  },
  methods: {
    initpage: function () {
      this.loadCredit()
    },
    // 征信报告
    loadCredit: function () {
      var vm = this
      //  var loanId = this.$route.query.loanId;
      //  var serviceType =this.$route.query.serviceType;
      // //  debugger
      //  var reqNo = this.$route.query.reqNo;
      //  console.log(reqNo,serviceType,loanId);
      var params = {}
      params.loanId = this.$route.query.loanId
      params.serviceType = this.$route.query.serviceType
      params.reqNo = this.$route.query.reqNo
      this.$ajax.get(this.baseUrl + '/approve/process/credit_reporting/service/getCreditDetail', { params: params }).then(re => {
        var data = re.data
        vm.intPyPersonShareholderreport = data.data.data.intPyPersonShareholderreport || []
        vm.intPyPersonArtificialnationalInfo = data.data.data.intPyPersonArtificialnationalInfo || []
        vm.intPyPersonTopmanagerinfo = data.data.data.intPyPersonTopmanagerinfo || []
      })
        .catch(er => { })
    }
  },
  created () {
    this.$ajax = this.$util.ajax()
    this.initpage()
    document.getElementsByTagName('title')[0].innerText = '鹏元征信数据-核心管理系统'
  },
  // watch: {
  //   //点击tab页签，加载数据，只加载一次
  //   "taskParams.creditDataPyServiceImpl_detail"(v) {
  //     debugger;
  //     if (v) {
  //       this.initpage();
  //     }
  //   }
  // },
  props: {
    taskParams: Object
  }
}
</script>

<style lang="less">
.ivu-form-item {
  margin-bottom: 1px;
}
</style>
